package com.lcc.service;

import com.lcc.spring.Autowired;
import com.lcc.spring.BeanNameAware;
import com.lcc.spring.Component;
import com.lcc.spring.InitializingBean;

@Component
public class UserService implements InitializingBean ,UserInterface , BeanNameAware {

    @Autowired
    private OrderService orderService;

    public void test() {
        orderService.test();

        System.out.println("调用 -----》UserService");
    }

    @Override
    public void afterPropertiesSet() {
        System.out.println("UserService --------->实例化之后");
    }

    private String beanName;

    @Override
    public void setBeanName(String name) {
        this.beanName = name;
    }

    public void test11() {
        System.out.println(beanName);
    }
}
